<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateQuestionListTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('question_list', function (Blueprint $table) {
            $table->increments('id');
            $table->string('question', 100)->default('')->comment('问题');
            $table->string('answer', 100)->default('')->comment('答案');
            $table->tinyInteger('flag')->default(1)->comment('1：有效，0：无效');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('question_list');
    }
}
